//
//  ZLCourseLerningDetailModel.m
//  ZLExamination
//
//  Created by Zheng on 2017/9/8.
//  Copyright © 2017年 Zheng. All rights reserved.
//

#import "ZLCourseLerningDetailModel.h"

@implementation ZLCourseLerningDetailListModel

- (void)setAttributes:(NSDictionary *)dataDic {
    [super setAttributes:dataDic];
    self.k_id = dataDic[@"id"];
}

@end

@implementation ZLCourseLerningDetailModel

- (void)setAttributes:(NSDictionary *)dataDic {
    
    [super setAttributes:dataDic];
    
    self.k_id = dataDic[@"id"];
        
    NSMutableArray *list = [NSMutableArray new];
    
    [self.chapter_lists enumerateObjectsUsingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
        ZLCourseLerningDetailListModel *model = [[ZLCourseLerningDetailListModel alloc] initWithDataDic:obj];
        [list addObject:model];
    }];
    
    self.chapterList = [list copy];
}

@end
